using Senparc.Weixin.MP.Helpers;
using System;
using System.Collections;
using System.Text;
using System.Web;
namespace Senparc.Weixin.MP.TenPayLib
{
	public class CheckRequestHandler : ClientRequestHandler
	{
		public CheckRequestHandler(HttpContext httpContext) : base(httpContext)
		{
			base.SetGateUrl("http://mch.tenpay.com/cgi-bin/mchdown_real_new.cgi");
		}
		protected override void CreateSign()
		{
			StringBuilder stringBuilder = new StringBuilder();
			foreach (string text in new ArrayList
			{
				"spid",
				"trans_time",
				"stamp",
				"cft_signtype",
				"mchtype"
			})
			{
				string text2 = (string)this.Parameters[text];
				if (text2 != null && "".CompareTo(text2) != 0 && "sign".CompareTo(text) != 0 && "key".CompareTo(text) != 0)
				{
					stringBuilder.Append(text + "=" + text2 + "&");
				}
			}
			stringBuilder.Append("key=" + base.GetKey());
			string text3 = MD5UtilHelper.GetMD5(stringBuilder.ToString(), this.GetCharset()).ToLower();
			base.SetParameter("sign", text3);
			base.SetDebugInfo(stringBuilder.ToString() + " => sign:" + text3);
		}
	}
}
